# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=opensmtpd-table-socketmap
pkgver=1.1
pkgrel=0
pkgdesc="OpenSMTPD socketmap tables"
url="https://github.com/OpenSMTPD/table-socketmap"
arch="all"
license="ISC"
makedepends="
	autoconf
	automake
	"
subpackages="$pkgname-doc"
source="https://github.com/OpenSMTPD/table-socketmap/archive/$pkgver/opensmtpd-table-socketmap-$pkgver.tar.gz"
builddir="$srcdir/table-socketmap-$pkgver"
options="!check"  # upstream does not provide tests

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/smtpd
	make
}

package() {
	make DESTDIR="$pkgdir" smtpdir="/usr/lib/opensmtpd" install
}

sha512sums="
b91d2406352a17fe6380a6151291621f572f986b59756c5c9b272c44a5d33eacdacc13af04fbf5bd97c60cf0d07e60b61284c9b23f2d49e8fa8228880e86e97c  opensmtpd-table-socketmap-1.1.tar.gz
"
